package cn.bdqn.z.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by 海洋 on 2019/1/12.
 */
@Controller
@RequestMapping("/user")
public class LoginController {
/*    @Autowired
    UserService loginservice;
    @ResponseBody
    public MSG loginvalidate(@ModelAttribute User u, HttpSession httpSession){
        String picode=(String) httpSession.getAttribute("rand");
        if(!picode.equalsIgnoreCase(u.getPic()))
            return new MSG("error code");
        if(u.getUsername()==null)
            return new MSG("username is null");
        String realpwd=loginservice.getpwdbyname(u.getUsername());
        if(realpwd!=null&&realpwd.equals(u.getPassword()))
        {
            httpSession.setAttribute("username", u.getUsername());
            return new MSG("success");
        }else
            return new MSG("error password");
    }*/

    @RequestMapping("/login")
    public String login(){
        System.out.println("ss");
        return "aa";    }


}
